A good answer might be:

No. The "5" will be read in, and then read the next five integers will be read in and added to the sum. The remaining lines will not be read.

Groups of Data

Sometimes the data in an input file consists of two (or more) groups. For example:

There are two groups of computer science students. The first group (called group "A") uses on-line lessons. The other group (called group "B") uses traditional printed text. All the students are given the same mid-term examination. Which group has the higher test average?

The file of test scores looks like this (the blue comments are not in the file):

3         <-- number of students in group "A"
87
98
95
4         <-- number of students in group "B"
78
82
91
84

Group "A" has three students in it and group "B" has four students in it. The program is to compute two averages from the data in this file.

QUESTION 7:

What will be the structure of the program that does this? Click here for a